home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1997 February / PC Shareware 1997-02.iso / programy / e! / api / ewapimp2.pa_ / ewapimp2.PAS
Encoding:
Pascal/Delphi Source File  |  1995-03-05  |  13.0 KB  |  262 lines

  1. {************************************************}
  2. {                         }
  3. { E! for Windows                 }
  4. { (c) - MainSoft sarl - 1992, 1994         }
  5. { EWAPI DLL import unit              }
  6. { version 2.0                     }
  7. {                         }
  8. {************************************************}
  9. {$I compdir.inc}
  10. {$C MOVEABLE DEMANDLOAD DISCARDABLE}
  11.  
  12. unit EWAPImp2;
  13.  
  14. INTERFACE
  15.  
  16. uses WinTypes, EWTypes;
  17.  
  18. {$I ewuser.inc}
  19.  
  20. {///////////////////////////// EW Editing Routines ///////////////////////////}
  21.  
  22. function EWAddTab(col : integer; fAdd : word) : integer;
  23. function EWAlternateHelp(col : integer; row : longint) : integer;
  24. function EWBeginLine(fSkipToPrev : word) : integer;
  25. function EWBlockShift : integer;
  26. function EWBlockSort(fAscend : word) : integer;
  27. function EWCase(fUpper : word) : integer;
  28. function EWCheckBrace(col : integer; row : longint) : integer;
  29. function EWClearLine(row : longint) : integer;
  30. function EWExecCompileCommand(commandindex : word) : integer;
  31. function EWDeleteChar : integer;
  32. function EWDeleteCurLine : integer;
  33. function EWDeleteEOL : integer;
  34. function EWDeleteLeft(fDeleteCurrent : word) : integer;
  35. function EWDeleteLines(start, num : longint) : integer;
  36. function EWDeleteSelection  : integer;
  37. function EWDeleteWord : integer;
  38. function EWEndLine(fSkipToNext, fStrip : word) : integer;
  39. function EWFillBlock(ch : char) : integer;
  40. function EWGetFile(Name : PChar; row : longint) : integer;
  41. function EWGotoBookmark(index : word) : integer;
  42. function EWGotoNextParagraph : integer;
  43. function EWGotoNextTab : integer;
  44. function EWGotoPrevTab : integer;
  45. function EWGotoPrevParagraph : integer;
  46. function EWGotoCompileError(fNext : word) : integer;
  47. function EWGotoLine(row : longint) : integer;
  48. function EWGotoXY(col : integer; row : longint) : integer;
  49. function EWGotoSelection(fBegin : word) : integer;
  50. function EWInsertBrace(col : integer; row : longint) : integer;
  51. function EWInsertLines(start, num : longint) : integer;
  52. function EWInsertMacroText(col : integer; row : longint; macrotype : word) : integer;
  53. function EWJoinLine(row : longint) : integer;
  54. function EWLoadUserFile(col : integer; row : longint) : integer;
  55. function EWNextCol : integer;
  56. function EWNextLine : integer;
  57. function EWNextWord(fNext : word) : integer;
  58. function EWTopOfPage(fTop : word) : integer;
  59. function EWHorzPageScroll(fLeft : word) : integer;
  60. function EWVerPageScroll(fUp : word) : integer;
  61. function EWPrevCol : integer;
  62. function EWPrevLine : integer;
  63. function EWPaste(fInsert : word) : integer;
  64. function EWReflow(row : longint) : integer;
  65. function EWRefresh(fAsk : word) : integer;
  66. function EWRemoveBookmark(index : word) : integer;
  67. function EWSaveFile(Name : PChar) : integer;
  68. function EWSelectAll : integer;
  69. function EWSetBookmark(col : integer; row : longint) : integer;
  70. function EWSetClipboard(fAppend : word) : integer;
  71. function EWPositionCurLine(position : word) : integer;
  72. function EWShiftTextRight(col : integer; row : longint; count : integer) : integer;
  73. function EWSplitLine(col : integer; row : longint) : integer;
  74. function EWStepScroll(dX : integer; dY : longint) : integer;
  75. function EWSumBlock : integer;
  76. function EWStripFlow : integer;
  77. function EWTopOfText(fTop : word) : integer;
  78. function EWTextToCurSor : integer;
  79. function EWToggleInsert : integer;
  80. function EWUpcaseFirst(col : integer; row : longint) : integer;
  81. function EWWriteBlock(startrow, endrow : longint;
  82.               startcol, endcol : integer;
  83.               Name    : PChar;
  84.               mode    : word;
  85.               fBlock,
  86.               fCompress : word) : integer;
  87. function EWMessageBox(WndParent: HWnd; Txt, Caption: PChar; TextType: Word): integer;
  88.  
  89. {//////////////////////// Service Routines ////////////////////////////////}
  90.  
  91. function  EWAddMenuEntry(Command, Title : PChar; CommandId : word; AssignMode : word; RoutineId : word) : longint;
  92. function  EWBeginSelection(SelType : word; col : integer; row : longint) : integer;
  93. function  EWCallUserExt(ExtName : PChar; RoutineId : word) : integer;
  94. function  EWEditFile(Name : PChar) : longint;
  95. function  EWEndSelection : integer;
  96. procedure EWEnumClones(EditorId : longint; CloneEnumProc : TEnumClonesProc);
  97. procedure EWEnumEditors(EdEnumProc : TEnumEditorsProc);
  98. function  EWFind(MatchLen : PWord; col : PWord) : longint;
  99. function  EWFindRegular(src, dest : PChar; MatchLen : PWord) : integer;
  100. function  EWGetCaretPosX : integer;
  101. function  EWGetCaretPosY : longint;
  102. function  EWGetCloneNum : word;
  103. function  EWGetCurWord : longint;
  104. function  EWGetCurrentEditor : longint;
  105. function  EWGetFileName(EditorId : longint) : PChar;
  106. function  EWGetGlobalFlag(FlagId : word) : integer;
  107. function  EWGetInsertState : word;
  108. function  EWGetLineAt(index : longint) : PChar;
  109. function  EWGetLineCount : longint;
  110. function  EWGetLocalFlag(FlagId : word) : integer;
  111. function  EWGetEditorLocalFlag(FlagId : word) : integer;
  112. function  EWGetSearchFlag(FlagId : word) : integer;
  113. procedure EWGetSelection(Selection : PSelStruct);
  114. function  EWGetTextPosX : integer;
  115. function  EWGetTextPosY : longint;
  116. function  EWGetVersion : word;
  117. function  EWGetWindowHandle : word;
  118. function  EWGetTextWindowHandle : word;
  119. procedure EWRemoveHook(hFlag : word; HookAddress : pointer);
  120. function  EWRemoveMenuEntry(Id : longint) : longint;
  121. function  EWRepeatFind(MatchLen : PWord) : longint;
  122. function  EWSetCurrentEditor(EditorId : longint) : longint;
  123. procedure EWSetFindPattern(pattern : PChar);
  124. function  EWSetGlobalFlag(FlagId, value : word) : integer;
  125. procedure EWSetHook(hFlag : word; HookAddress : pointer);
  126. function  EWSetLineAt(P : PChar; index : longint) : integer;
  127. function  EWSetLocalFlag(FlagId, value : word) : integer;
  128. function  EWSetEditorLocalFlag(FlagId, value : word) : integer;
  129. procedure EWSetModified;
  130. function  EWSetSearchFlag(FlagId, value : word) : integer;
  131. function  EWStopSelection(col : integer; row : longint) : integer;
  132. function  EWUpdateSelection(col : integer; row : longint) : integer;
  133. procedure EWWriteMessage(message : PChar);
  134. function  EWGetInstance : word;
  135. function  EWIsModified : word;
  136. function  EWSaveAll : integer;
  137. function  EWGetEditorCount : integer;
  138. function  EWGetPrjName(PrjName : PChar) : integer;
  139. procedure EWAsynchEditFile(Name : PChar); export;
  140.  
  141. {-Please see Technical Note #008 before using these functions}
  142. procedure EWSetEditorId(EditorId : longint);
  143. procedure EWSetWindowHandle(H : HWnd);
  144.  
  145. IMPLEMENTATION
  146.  
  147. function EWAddTab;               external 'ewapi2' index    1;
  148. function EWBeginLine;               external 'ewapi2' index    2;
  149. function EWBlockShift;               external 'ewapi2' index    3;
  150. function EWBlockSort;               external 'ewapi2' index    4;
  151. function EWCase;               external 'ewapi2' index    5;
  152. function EWCheckBrace;               external 'ewapi2' index    6;
  153. function EWClearLine;               external 'ewapi2' index    7;
  154. function EWExecCompileCommand;           external 'ewapi2' index    8;
  155. function EWDeleteChar;               external 'ewapi2' index    9;
  156. function EWDeleteCurLine;           external 'ewapi2' index 10;
  157. function EWDeleteEOL;               external 'ewapi2' index 11;
  158. function EWDeleteLeft;               external 'ewapi2' index 12;
  159. function EWDeleteLines;            external 'ewapi2' index 13;
  160. function EWDeleteSelection;           external 'ewapi2' index 14;
  161. function EWDeleteWord;               external 'ewapi2' index 15;
  162. function EWEndLine;               external 'ewapi2' index 16;
  163. function EWFillBlock;               external 'ewapi2' index 17;
  164. function EWGetFile;               external 'ewapi2' index 18;
  165. function EWGotoBookmark;           external 'ewapi2' index 19;
  166. function EWGotoNextParagraph;           external 'ewapi2' index 20;
  167. function EWGotoNextTab;            external 'ewapi2' index 21;
  168. function EWGotoPrevTab;            external 'ewapi2' index 22;
  169. function EWGotoPrevParagraph;           external 'ewapi2' index 23;
  170. function EWGotoCompileError;           external 'ewapi2' index 24;
  171. function EWGotoLine;               external 'ewapi2' index 25;
  172. function EWGotoXY;               external 'ewapi2' index 26;
  173. function EWGotoSelection;           external 'ewapi2' index 27;
  174. function EWInsertBrace;            external 'ewapi2' index 28;
  175. function EWInsertLines;            external 'ewapi2' index 29;
  176. function EWInsertMacroText;           external 'ewapi2' index 30;
  177. function EWJoinLine;               external 'ewapi2' index 31;
  178. function EWLoadUserFile;           external 'ewapi2' index 32;
  179. function EWNextCol;               external 'ewapi2' index 33;
  180. function EWNextLine;               external 'ewapi2' index 34;
  181. function EWNextWord;               external 'ewapi2' index 35;
  182. function EWTopOfPage;               external 'ewapi2' index 36;
  183. function EWHorzPageScroll;           external 'ewapi2' index 37;
  184. function EWVerPageScroll;           external 'ewapi2' index 38;
  185. function EWPrevCol;               external 'ewapi2' index 39;
  186. function EWPrevLine;               external 'ewapi2' index 40;
  187. function EWPaste;               external 'ewapi2' index 41;
  188. function EWReflow;               external 'ewapi2' index 42;
  189. function EWRefresh;               external 'ewapi2' index 43;
  190. function EWRemoveBookmark;           external 'ewapi2' index 44;
  191. function EWSaveFile;               external 'ewapi2' index 45;
  192. function EWSelectAll;               external 'ewapi2' index 46;
  193. function EWSetBookmark;            external 'ewapi2' index 47;
  194. function EWSetClipboard;           external 'ewapi2' index 48;
  195. function EWPositionCurLine;           external 'ewapi2' index 49;
  196. function EWShiftTextRight;           external 'ewapi2' index 50;
  197. function EWSplitLine;               external 'ewapi2' index 51;
  198. function EWStepScroll;               external 'ewapi2' index 52;
  199. function EWSumBlock;               external 'ewapi2' index 53;
  200. function EWStripFlow;               external 'ewapi2' index 54;
  201. function EWTopOfText;               external 'ewapi2' index 55;
  202. function EWTextToCurSor;           external 'ewapi2' index 56;
  203. function EWToggleInsert;           external 'ewapi2' index 57;
  204. function EWUpcaseFirst;            external 'ewapi2' index 58;
  205. function EWWriteBlock;               external 'ewapi2' index 59;
  206. function EWAlternateHelp;           external 'ewapi2' index 60;
  207. {////////////////////////////////////////////////////////////////}
  208. function  EWAddMenuEntry;           external 'ewapi2' index 61;
  209. function  EWBeginSelection;           external 'ewapi2' index 62;
  210. function  EWCallUserExt;           external 'ewapi2' index 63;
  211. function  EWEditFile;               external 'ewapi2' index 64;
  212. function  EWEndSelection;           external 'ewapi2' index 65;
  213. procedure EWEnumClones;            external 'ewapi2' index 66;
  214. procedure EWEnumEditors;           external 'ewapi2' index 67;
  215. function  EWFind;               external 'ewapi2' index 68;
  216. function  EWFindRegular;           external 'ewapi2' index 69;
  217. function  EWGetCaretPosX;           external 'ewapi2' index 70;
  218. function  EWGetCloneNum;           external 'ewapi2' index 71;
  219. function  EWGetCurWord;            external 'ewapi2' index 72;
  220. function  EWGetCurrentEditor;           external 'ewapi2' index 73;
  221. function  EWGetFileName;           external 'ewapi2' index 74;
  222. function  EWGetGlobalFlag;           external 'ewapi2' index 75;
  223. function  EWGetInsertState;           external 'ewapi2' index 76;
  224. function  EWGetLineAt;               external 'ewapi2' index 77;
  225. function  EWGetLineCount;           external 'ewapi2' index 78;
  226. function  EWGetLocalFlag;           external 'ewapi2' index 79;
  227. function  EWGetSearchFlag;           external 'ewapi2' index 80;
  228. procedure EWGetSelection;           external 'ewapi2' index 81;
  229. function  EWGetTextPosX;           external 'ewapi2' index 82;
  230. function  EWGetVersion;            external 'ewapi2' index 83;
  231. function  EWGetWindowHandle;           external 'ewapi2' index 84;
  232. procedure EWRemoveHook;            external 'ewapi2' index 86;
  233. function  EWRemoveMenuEntry;           external 'ewapi2' index 87;
  234. function  EWRepeatFind;            external 'ewapi2' index 88;
  235. function  EWSetCurrentEditor;           external 'ewapi2' index 90;
  236. procedure EWSetEditorId;           external 'ewapi2' index 91;
  237. procedure EWSetFindPattern;           external 'ewapi2' index 92;
  238. function  EWSetGlobalFlag;           external 'ewapi2' index 93;
  239. procedure EWSetHook;               external 'ewapi2' index 94;
  240. function  EWSetLineAt;               external 'ewapi2' index 95;
  241. function  EWSetLocalFlag;           external 'ewapi2' index 96;
  242. function  EWSetSearchFlag;           external 'ewapi2' index 97;
  243. procedure EWSetWindowHandle;           external 'ewapi2' index 98;
  244. function  EWStopSelection;           external 'ewapi2' index 99;
  245. function  EWUpdateSelection;           external 'ewapi2' index 100;
  246. procedure EWWriteMessage;           external 'ewapi2' index 101;
  247. function  EWGetTextWindowHandle;       external 'ewapi2' index 102;
  248. procedure EWSetModified;           external 'ewapi2' index 103;
  249. function  EWGetInstance;           external 'ewapi2' index 104;
  250. function  EWIsModified;            external 'ewapi2' index 105;
  251. function  EWGetEditorLocalFlag;        external 'ewapi2' index 106;
  252. function  EWSetEditorLocalFlag;        external 'ewapi2' index 107;
  253. function  EWSaveAll;               external 'ewapi2' index 108;
  254. function  EWGetCaretPosY;           external 'ewapi2' index 109;
  255. function  EWGetTextPosY;           external 'ewapi2' index 110;
  256. function  EWMessageBox;            external 'ewapi2' index 111;
  257. function  EWGetEditorCount;           external 'exapi2' index 112;
  258. function  EWGetPrjName;            external 'ewapi2' index 113;
  259. procedure EWAsynchEditFile;           external 'ewapi2' index 114;
  260.  
  261. end.
  262.